package dao;

//单例模式
public class DaoFactory {

    private DaoFactory(){}

    private static MessageDao messageDao;

    private static CountsDao countsDao;

    public static MessageDao getMessageDaoInstance() {
        if(messageDao == null) {
            messageDao = new MessageDao();
        }
        return messageDao;
    }

    public static CountsDao getCountsDaoInstance() {
        if(countsDao == null) {
            countsDao = new CountsDao();
        }
        return countsDao;
    }
}
